package com.zhoukx.composite;

/**
 * @ClassName OrganizationComponet
 * @Description:
 * @Author zhoukx
 * @Date 2020/8/10
 **/
public abstract class OrganizationComponet {
    // 名字
    private String name;
    // 描述
    private String des;

    protected void add(OrganizationComponet organizationComponet) {
        // 默认实现
        throw new UnsupportedOperationException();
    }

    // 删除方法
    protected void remove(OrganizationComponet organizationComponet) {
        //默认实现
        throw new UnsupportedOperationException();
    }

    // 打印方法
    protected abstract void print();

    public OrganizationComponet(String name, String des) {
        this.name = name;
        this.des = des;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDes() {
        return des;
    }

    public void setDes(String des) {
        this.des = des;
    }
}
